package cn.yanglq.Rss.web.service.impl;

import cn.yanglq.Rss.web.dao.SysParamMapper;
import cn.yanglq.Rss.web.model.SysParam;
import cn.yanglq.Rss.web.service.SysParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by yanglq on 2018/1/19.
 */
@Service
public class SysParamServiceImpl implements SysParamService {
    @Autowired
    private SysParamMapper sysParamMapper;

    @Override
    public int findSysParam(String sysKey) {
        SysParam sysParam = sysParamMapper.selectByPrimaryKey(sysKey);
        if (sysParam != null) {
            return Integer.parseInt(sysParam.getSysvalue());
        }
        return 0;
    }
}
